package com.sh.工厂模式.简单工厂模式;

import com.sh.工厂模式.简单工厂模式.抽象产品.Weapon;
import com.sh.工厂模式.简单工厂模式.简单工厂.WeaponFactory;

/**
 * @Auther: sh
 * @Version 1.0
 * @Description:
 */
public class Main {
    public static void main(String[] args) {
        Weapon weapon1 = WeaponFactory.get("TANK");
        weapon1.attack();

        Weapon weapon2 = WeaponFactory.get("FIGHTER");
        weapon2.attack();

        Weapon weapon3 = WeaponFactory.get("DAGGER");
        weapon3.attack();
    }
}

